home *** CD-ROM | disk | FTP | other *** search
/ Cream of the Crop 3 / Cream of the Crop 3.iso / comm / prtcs155.zip / WCHAT.REX < prev    next >
OS/2 REXX Batch file  |  1994-01-14  |  1KB  |  41 lines

  1. /**/
  2. v="$VER: WChat Rexx  Sysop WPL Chat Utility            Williamson 54.05"
  3. mailer=upper(GetClip('SHELTER'))
  4. wtit="Chat v"||right(v,5)
  5. pscreen=GetClip('SCREEN')
  6. wspec='CON:0/130/640/90/'wtit' Hit tilde to exit/CLOSE/SCREEN'||pscreen
  7.  
  8. call close('STDOUT') ; call open('STDOUT',wspec,'W')
  9. call close('STDIN')  ; call open('STDIN','*','R')
  10.  
  11. parse arg port mode .
  12. if port = "" then exit 40
  13. address VALUE mailer||port
  14. 'String "$(username)"'
  15. fname=RESULT
  16. if fname="" | fname="FNAME" | fname="RESULT" then fname="TWIT"
  17.  
  18. 'SetStatus NULL:'
  19. 'Set chat ONLINE'
  20. uspec='CON:0/40/640/90/User 'fname' Chatting/AUTO/INACTIVE/CLOSE/SCREEN'||pscreen
  21. 'SetStatus' '"'uspec'"'
  22. if upper(mode)="SYSOP" then do
  23. 'Set chatmode SYSOP'
  24. end
  25.  
  26. 'Send "\r\n"'||wtit||'"\r\n"'
  27. 'Send "\r\nSystem operator is online\r\n"'
  28.  
  29. do forever
  30.     parse pull text
  31.     if text='~' then leave
  32.     'Send' '"\r\n'text'\r\n"'
  33. end
  34.  
  35. 'SetStatus NULL:'
  36. 'Set chat OFFLINE'
  37. 'Clear chatmode'
  38. 'SetStatus "$(openstatus)"'
  39. 'Send "\r\nChat terminated, hit RETURN for prompt.\r\n"'
  40. exit
  41.